package chap2;

import java.util.Scanner;

public class ScoreStat {
    public static void main(String[] args) {
        //统计王浩 java,sql,stb的成绩，计算平均分和java和Sql的分数差
        Scanner in=new Scanner(System.in);
        System.out.print("请输入王浩的java成绩：");
        int javaScore=in.nextInt();
        System.out.print("请输入王浩的sql成绩：");
        int sqlScore=in.nextInt();
        System.out.print("请输入王浩的stb的成绩：");
        int stb=in.nextInt();
        int avg=(javaScore+sqlScore+stb)/3;
        int diff=javaScore-sqlScore;
        System.out.println("三门课的平均分是："+avg);
        System.out.println("java和Sql的成绩差是"+diff);
    }
}
